package day4;

public class HomeWork3 {
    public static void main(String[] args) {
        /*
        现有鸡兔共35只，漏出的脚有94只，问鸡兔各多少只
         */
        for (int x = 0; x <= 24; x++) {
            // 小鸡的数量
            int chick = 35 - x;
            // 兔子的脚
            int rabbit = x * 4;
            if(rabbit + chick * 2 == 94) {
                System.out.print("兔子有：" + x + "只");
                System.out.println("小鸡有：" + chick + "只");
            }
        }
    }
}
